import VueRouter from 'vue-router'
import Vue from 'vue'
Vue.use(VueRouter)
const routes = [
  {
    path: '*',
    redirect: '/404'
  },
  {
    path: '/404',
    component: require('@pages/no-found/no-found').default
  },
  {
    path: '/',
    redirect: '/root'
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('@pages/home/home')
  },
  {
    path: '/root',
    name: 'root',
    component: () => import('@pages/root/root')
  }
]

const router = new VueRouter({
  routes
})

export default router
